package com.atguigu.springcloud.controller;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.thread.ThreadUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @PROJECT_NAME: cloud2020
 * @DESCRIPTION: Sentinel
 * @Author: csc
 * @DATE: 2023/4/1 8:56
 */
@RestController
public class FlowLimitController {



     @Value("${server.port}")
     public String serveerPort;

     @GetMapping("/testA")
     public String testA(){
          //休眠2秒
//          ThreadUtil.sleep(800);
          System.out.println(Thread.currentThread().getName()+".....testA"+ DateTime.now().toString("yyyy-MM-dd HH:mm:ss"));
          return "-------testA";
     }

     @GetMapping("/testB")
     public String testB(){
          return "-------testB";
     }


}
